Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add validation checks for immutable fields #44

Merged
merged 4 commits into from
Sep 16, 2023
Merged

feat: Add validation checks for immutable fields #44

merged 4 commits into from
Sep 16, 2023

Conversation

Fei-Guo
Copy link
Collaborator

@Fei-Guo Fei-Guo commented Sep 16, 2023

This change adds checks when CRD are updated. Any changes to the immutable fields will be rejected.
The steps for creation validations are commented (to be implemented).

Manual test:
Edit a workspace object and change all immutable fields. Get the following error msg:

error: workspaces.kdm.io "bad" could not be patched: admission webhook "validation.webhook.kdm.io" denied the request: validation failed: field is immutable: inference.preset.name, resource.count, resource.instanceType, resource.labelSelector

@Fei-Guo Fei-Guo merged commit fd11734 into main Sep 16, 2023
3 checks passed
@Fei-Guo Fei-Guo deleted the fguo-dev2 branch September 16, 2023 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants